import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import 'bootstrap/dist/css/bootstrap.css'
import Vant from 'vant';
import 'vant/lib/index.css';
import "./utils/axios"
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
import 'element-ui/lib/theme-chalk/display.css';
// import VueCropper from 'vue-cropper'
// .use(VueCropper)
Vue.config.productionTip = false
Vue.config.ignoredElements = ['wx-open-subscribe']
Vue.use(Vant).use(ElementUI);

//判断版本号
const VUE_APP_VERSION = require('../package.json').version
const vers = window.localStorage.getItem("Version");
if(VUE_APP_VERSION != vers){
  let xinshou = localStorage.getItem('xinshou')
  let userToken = localStorage.getItem('userToken')
  localStorage.clear()
  if(xinshou){
    localStorage.setItem('xinshou',xinshou)
  }
  if(userToken){
    localStorage.setItem('userToken',userToken)
  }
  window.localStorage.setItem("Version", VUE_APP_VERSION);
  location.reload()
}

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
